//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#ifndef _CathCDDF_h__
#define	_CathCDDF_h__
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#include "libraries.h"

#include "CathCLF.h"
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
class SegmentCDDF {

  private:
    
    int   rangeStart;
    int   rangeEnd;
    int   length;
    
    char* tmp;
    
  public:
    
    SegmentCDDF ();  
    SegmentCDDF (const SegmentCDDF&);  
    SegmentCDDF (const SegmentCDDF*);  
    
    ~SegmentCDDF ();  
    
    void        RangeStart (int);
    void        RangeEnd (int);
    void        Length (int);
    
    int         RangeStart (void);
    int         RangeEnd (void);
    int         Length (void);
    
    bool        ReadData (char*);
    bool        ReadData (void);
    
    bool        ReadPair (void);
    
    bool        StoreData (char*);
    
    SegmentCDDF operator= (const SegmentCDDF&);
  
};
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
class CathCDDF {
  
  private:
    
    String*               format;
    String*               domain;
    String*               name;
    String*               source;
    String*               cathCode;
    
    CathCLF*              codeCathDomain;
    int                   domainLength;
    String*               domainSequence;
    
    int                   numberSegments;
    
    TListE <SegmentCDDF>* listSegments;
    
    String*               toString;
    
  protected:
    
    void                  CleanData (void);
    
  public:
    
    CathCDDF ();
    CathCDDF (const CathCDDF&);
    CathCDDF (const CathCDDF*);
    
    ~CathCDDF ();
    
    void                  Format (String*);
    void                  Domain (String*);
    void                  Name (String*);
    void                  Source (String*);
    void                  CathCode (String*);
    
    void                  CodeCathDomain (CathCLF*);
    void                  DomainLength (int);
    void                  DomainSequence (String*);
    
    void                  NumberSegments (int);
    
    void                  ListSegments (TListE <SegmentCDDF>*);
    
    String*               Format (void);
    String*               Domain (void);
    String*               Name (void);
    String*               Source (void);
    String*               CathCode (void);
    
    CathCLF*              CodeCathDomain (void);
    int                   DomainLength (void);
    String*               DomainSequence (void);
    
    int                   NumberSegments (void);
    
    TListE <SegmentCDDF>* ListSegments (void);
    
    bool                  ReadFromString (String*);
    bool                  ReadFromString (char*);
    
    String*               ToStringSegment (void);
    
    CathCDDF              operator= (const CathCDDF&);

};
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#endif
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
